<%@ page contentType="text/html; charset=UTF-8" language="java" errorPage="" %>
<%@page import="com.tjsinfo.tjsoa.common.ToolKit"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
String treePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+"/RQOAtree/";
String nowSQL = ToolKit.getProperties("com/tjsinfo/tjsoa/mail/properties/systemResource.properties", this).getProperty("nowSQL");
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>上传页面</title>
	<meta http-equiv="x-ua-compatible" content="ie=7" />
	<link href="<%=basePath%>style/txlz7.css" rel="stylesheet" type="text/css" id="txlz7"/>
	
	 <style>
			 td {
				font:12px/170% "宋体", "新宋体", "黑体"; color:#000
			}
			th {
				font:12px/170% "宋体", "新宋体", "黑体"; color:#000
			}
		.black_overlays{
			display: none;
			position: absolute;
			top: 0%;
			left: 0%;
			width: 100%;
			height: 100%;
			background-color: #C1EBFC;
			z-index:1002;
			-moz-opacity: 0.8;
			opacity:.80;
			filter: alpha(opacity=30);
		}
		
		.ErrorDiv {
			display: none;
			position: absolute;
			border: 1px solid #FFF;
			border-bottom:none;
			z-index:1003;
			overflow: auto;
		}
		
		.tree {
	display: none;
	position: absolute;
	top: 25%;
	left: 30%;
	width: 253px;
	height: 235px;
	border: 1px solid #11557B;
	border-bottom: block;
	background-color: #E2F7FF;
	z-index: 1003;
	overflow: auto;
}

.title {
	display: none;
	position: absolute;
	top: 21%;
	left: 30%;
	width: 255px;
	height: 205px;
	border: 0px solid #000;
	border-bottom: none;
	background-color: #E2F7FF;
	z-index: 1003;
	overflow: auto;
}

  .prog-border {
  height: 15px;
  width: 205px;
  background: #fff;
  border: 1px solid #000;
  margin: 0;
  padding: 0;
  }

  .prog-bar {
  height: 11px;
  margin: 2px;
  padding: 0px;
  background: #178399;
  font-size: 10pt;
  }
  
  .lan01{
background: url(<%=basePath%>images/lanbg01.gif) no-repeat 0 0; width:6px; height:24px;} 
.lan02{
background: url(<%=basePath%>images/lanbg02.gif) repeat-x; width:99%; height:24px;}            
.lan03{
background: url(<%=basePath%>images/lanbg03.gif) no-repeat; width:8px; height:24px;}             
.cha{
padding-top:3px}
	 </style>
	 <%
		String returnString = (String)request.getAttribute("returnString");
	 %>
	<!-- 多系统树 开始 -->
	<link href="<%=treePath %>ajaxLibrary/ext/resources/css/ext-all.css" rel="stylesheet" type="text/css" />
	<script type="text/javascript" src="<%=treePath %>ajaxLibrary/ext/ext-base.js"></script>
	<script type="text/javascript" src="<%=treePath %>ajaxLibrary/ext/ext-all.js"></script>
	<script type="text/javascript" src="<%=treePath %>ajaxLibrary/ext/ext-lang-zh_CN.js"></script>
	<script type="text/javascript" src="<%=basePath %>ajaxFramework/jQuery/jquery.js"></script>
	<script type="text/javascript" src="<%=basePath %>js/common/global/validator.js"></script>
	<script type="text/javascript" src="<%=basePath %>js/common/global/pageControl.js"></script>
	<script type="text/javascript" src="<%=treePath %>ajaxLibrary/ext/init.js"></script>
	<script type="text/javascript" src="<%=treePath %>js/system/singleuserinfocheckedtree.js"></script>
	<script type="text/javascript">
	function peopleTree(){
		var win = singleuserinfocheckedtree(<%=nowSQL %>);
		win.show();
		win.on("winsubmint",function(data){
			document.getElementById('express_username').value = data.usernametext;
			document.getElementById('userid').value = data.userid;
			win.hide();
		});
	}
	</script>
	<!-- 结束 -->
	
	<!-- 执行上传文件操作的函数 start-->
	<script type="text/javascript" src="<%=basePath %>fileExpress/fileUpload/ajaxfileupload.js"></script>
	<script type="text/javascript" src="<%=basePath %>fileExpress/fileUpload/ajaxFileZx.js"></script>
	<script type="text/javascript">
	var deleteFile;
	var alreadyUploadFile='';
	var uploadUrl='<%=basePath %>tjsinfo/tjsoa/fileExpress/ajaxFileUpload.do?method=uploader';
	var deteleFileUrl='<%=basePath %>tjsinfo/tjsoa/fileExpress/ajaxFileUpload.do?method=deleted';
	</script>
	<!-- 执行上传文件操作的函数 end-->	
	
		<script>
		var returnString = '<%=returnString %>';
	
	function closeErrorDiv(){
		document.getElementById("blackdiv").style.display = "none";
		document.getElementById("ErrorDiv").style.display = "none";
	}
	
	function xianshiErrorDiv(){
		document.getElementById("ErrorDiv").style.top = document.body.clientHeight/4;
		document.getElementById("ErrorDiv").style.left = document.body.clientWidth/8;
		document.getElementById("blackdiv").style.display = "block";
		document.getElementById("ErrorDiv").style.display = "block";
	}
	
	function xianshiErrorDiv2(){
		document.getElementById("ErrorDiv2").style.top = document.body.clientHeight/4;
		document.getElementById("ErrorDiv2").style.left = document.body.clientWidth/8;
		document.getElementById("blackdiv").style.display = "block";
		document.getElementById("ErrorDiv2").style.display = "block";
	}
	
	function fuzhi(){
		var username = document.getElementById('express_username').value;
		if(username == null || username == ''|| username == ','){
			Ext.MessageBox.alert('提示框','<nobr>请选择接收的系统用户</nobr>');
			return;
		}
		var beizhu = document.getElementById('beizhu').value;
		if(beizhu != null && beizhu != ''){
			if(beizhu.length>=221){
				Ext.MessageBox.alert('提示框','<nobr>备注最多为220字！</nobr>');
				return;
			}
			if(!/^[^\|"'<>]*$/.test(beizhu)){
  				Ext.MessageBox.alert('提示框',"<nobr>备注中不能含有<br/> 1 单引号: ' <br/> 2 双引号: \" <br/> 3 竖  杠: | <br/> 4 尖角号: < > <br/><br/>请检查输入！</nobr>");  
			 	return; 
  			}
		}
		
		if(document.getElementById('files').innerHTML!=''){
			document.form1.submit();
		}else{
			Ext.MessageBox.alert('提示框','<nobr>请选择上传文件</nobr>');
		}
	}
	
	window.onload = function(){
		//initselectusertreecheck();
		document.getElementById("right").style.width = document.body.clientWidth-5;
		var tb = new Ext.Toolbar(
			{
				height:25,
				items :[{
			            text:'确定',
			            iconCls: 'daohang',
			        	handler: function(){
			        		fuzhi();
						}
			    },
			    {
			            text:'返回',
			            iconCls: 'daohang',
			        	handler: function(){
			        		location.href="<%=basePath%>tjsinfo/tjsoa/fileExpress/loginFileExpress.do";
						}
			    }] 
			}
		);
	
		tb.addFill();
	    tb.addText('<img id="windowResize" src="<%=basePath%>images/m_icon05.gif;"><a style="font-weight:bold; color:black;line-height: 22px;">发送文件</a>&nbsp;&nbsp;&nbsp;');
	     tb.render('menu');
	}
	</script>
</head>

<body>
  <div id="right" style="height: 100%;">
      <div id="menu" style="padding-top:4px;"></div>
      <div class="contact_content" style="height: 92%;">
         	  <div class="wjsdcontent" style="border-top:0px;">
         	  <form action="<%=basePath %>tjsinfo/tjsoa/fileExpress/upload.do" name="form1" method="post" onsubmit="fuzhi();">
				<div id="files" style="display: none;"></div>
                  <table width="100%" border="0" cellspacing="0" >
                    <tr>
                      <td align="right">接收人:</td>
                      <td colspan="3"><input name="express_username" type="text"
										id="express_username" readonly="readonly" size="125"/>
					<input type="hidden" name="userid"
										id="userid" />
					<input type="button" value="选择接收人" onclick="peopleTree()"/></td>
                    </tr>
                    <tr>
                      <td align="right" width="11%">级别:</td>
                      <td colspan="3">
                      	<select name="jibie" id="jibie">
              				<option value="0" selected="selected">普通</option>
              				<option value="1">加急</option>
              			</select>
                      </td>
                    </tr>
                    <tr>
                      <td align="right" width="11%">备注:<br/>(不得大于220字)</td>
                      <td colspan="3"><textarea name="beizhu" id="beizhu" cols="95" rows="10"></textarea></td>
                    </tr>
					<tr>
						<td align="right" valign="top">
							<img src="<%=basePath %>images/m_icon212.gif" width="67" height="21" />
						</td>
						<td valign="top">
            				<span><input type="file" UNSELECTABLE="on"  name="uploadFile" id="uploadFile" size="34" class="textinput" />&nbsp;<a style="cursor: hand" onclick="ajaxFileUpload()"><img src="<%=basePath %>images/scicon.gif" /></a></span>
            				<div class="sc_listLong"><ul id="uploadList"></ul></div>
            				<input type="hidden" name="fileSize" id="fileSize" value="1999"/>
						</td>
					</tr>
                  </table>
         	  		<input type="hidden" name="node2" id="node2"/>
					<input id="basePath" value="<%=basePath%>" type="hidden"/>
					<input  type="hidden" name="node" id="node" value=""/>
                  </form>
          	</div>
 			</div>          
  </div>

<div id="blackdiv" class="black_overlays">
	<iframe style="width:100%;height:100%;filter:alpha(opacity=0);-moz-opacity:0"></iframe>
</div>
</body>
</html>
